using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.IO;
using System.Runtime.Remoting;

namespace Midas.Core
{
	public enum UserType
	{
		Admin,
		Judge,
		Board,
		Team
	}

	public abstract class MidasUtility
	{
		public static void ReadConfiguration(Type type)
		{
			string s = Assembly.GetAssembly(type).Location;
			s = Path.GetFileName(s) + ".config";
			try
			{
				RemotingConfiguration.Configure(s);
			}
			catch (Exception e)
			{
				Console.Error.WriteLine("Problem reading configuration file;\n"+e.GetType().ToString() +": "+e.Message+"\n\n");
				Console.Error.WriteLine("Source: " + e.Source+"\n\n");
				Console.Error.WriteLine(e.StackTrace);
			}
		}
	}
}
